package com.vhall.component.entity.reward.vo;

import com.vhall.component.framework.common.annotation.ParamName;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author lsl
 * @since 2021/7/6
 */
@Data
public class RewardGiveReqVO implements Serializable {


    @Pattern(regexp = "(WEIXIN)|(ALIPAY)", message = "取值范围:WEIXIN,ALIPAY")
    @NotBlank(message = "channel不能为空")
    private String channel;

    @Pattern(regexp = "(QR_PAY)|(H5_PAY)|(CASHIER)|(JSAPI)", message = "取值范围:QR_PAY,H5_PAY,CASHIER,JSAPI")
    @ParamName("service_code")
    @NotBlank(message = "service_code不能为空")
    private String serviceCode;

    @ParamName("reward_amount")
    @DecimalMin(value = "0.01", message = "打赏金额不能小于1分")
    @DecimalMax(value = "100000", message = "打赏金额不能超过100000元")
    @NotNull(message = "reward_amount不能为空")
    private BigDecimal rewardAmount;

    @ParamName("room_id")
    @NotBlank(message = "room_id不能为空")
    @Length(max = 255)
    private String roomId;

    private String describe;

    @ParamName("open_id")
    private String openId;
}
